|
|
|
|
|
|
|
external database into your own MDB. By creating attachments, you can access and manipulate external data files as if they are native Microsoft Access tables. Attached tables appear in the Database window as local table objects in your database, even though they are only links to external data files. |
|
|
|
|
| |
|
|
|
|
Not only is the attachment method convenient, it provides the fastest way to access external data using Visual Basic 5 programs. You can load, index, and display attached external tables faster than you can if you use ODBC or directly open the external data files in their native format. |
|
|
|
|
|
|
|
|
|
|
Now create an attached table in the BOOKS5.MDB database that we used earlier today. |
|
|
|
|
|
|
|
|
If you like, you can create an attachment to any other Microsoft Jet format database you already have on hand. |
|
|
|
|
|
|
|
|
First, if you don't have it loaded already, select File | Open Database . . . from the main menu to load the BOOKS5.MDB (TYSDBVB5\SOURCE\DATA) database. Then select the Utility | Attachments menu option. You will see a grid that shows all the current attachments for this database. Because there are no attachments to this database, this box should be empty. Click the New command button to open the New Attached Table dialog box. Your screen should now look like Figure 7.39. |
|
|
|
|
|
|
|
|
Figure 7.39.
Adding an attachment to a Microsoft Access database. |
|
|
|
|
|
|
|
|
Table 7.2 shows the information you should enter into the Attachment dialog box. |
|
|
|
|
|